const express = require('express');
var merchantController = require('../../controllers/o2o_admin/merchant.server.controller');


module.exports = (app) => {
    const router = express.Router();


    //merchant
    router.route('/merchants')
    .get(merchantController.findAllMerchant);

    router.route('/merchants/:status')
    .get(merchantController.findMerchantByStatus);

    router.route('/merchant/:id')
    .get(merchantController.findMerchantById);

    router.route('/merchant')
    .post(merchantController.updateStatus);

    app.use('/admin', router);
};